package DiYiZhou;

import java.util.Scanner;

public class LianXi4 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个数字");
        int a,b;
        a= scanner.nextInt();
        b=(a/1000)+(a/100%10)+(a%10)+(a/10%10);
        System.out.println("输出的b为：");
        System.out.println("b = " + b);

    }
}
